﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;

namespace ADUSWebApp.Models
{

    [MetadataType(typeof(MovieMetadata))]
    public partial class Movie
    {
        class MovieMetadata
        {
            public Int32 Id { get; set; }

            [Required(ErrorMessage="Titiles are required")]
            public string Title{get; set;}

            [Required(ErrorMessage = "ReleaseDate are required")]
            public DateTime ReleaseDate { get; set; }

            [Required(ErrorMessage = "Genre are required")]
            public string Genre { get; set; }

            [Required(ErrorMessage="The Price is required")]
            [Range(5,1000,ErrorMessage="Movies cost between $5 and $1000")]
            public decimal Price{get; set;}

            [Required(ErrorMessage = "The Rating is required")]
            public string Rating { get; set; }

        }
        //public class MovieDBContext : DbContext
        //{
        //    public DbSet<Movie> Movies { get; set; }
        //}
    }
}